package com.qunar.homework2;

import com.google.common.io.Files;
import com.qunar.homework2.model.Book;
import com.qunar.homework2.service.ScrapyService;

import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;


public class HomeWork2Main {

    public static void main(String... args) throws IOException {
        ScrapyService<Book> scrapyService = new ScrapyService();
        List<String> idList = Files.readLines(new File("E:\\DEV\\Project\\homework\\homework2\\src\\main\\java\\com\\qunar\\homework2\\data\\id_list.txt"), Charset.forName("utf-8"));
        idList.forEach(System.out::println);
        scrapyService.ScrapyTInfo(idList, "https://api.douban.com/v2/book/", "E:\\DEV\\Project\\homework\\homework2\\src\\main\\java\\com\\qunar\\homework2\\data\\result.txt");
    }
}
